// SMSApp.cpp: implementation of the CSMSApp class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "log4cplus_switch.h"
#include <string>
#include <list>
#include <map>
#include <common/Pool.h>
#include "NETLIB\TCPClient.h"
#include "netlib/SocketEngine.h"
#include "SMSItem.h"
#include "SMSDispatch.h"
#include  "SMSQueue.h"
#include "Account.h"
#include "AccountManager.h"
#include "IF.h"
#include "IFManager.h"
#include "SMSApp.h"


LOG4CPLUS_CLASS_IMPLEMENT( CSMSApp, _s_logger, "CSMSApp" );

CSMSApp* CSMSApp::m_Instance = NULL;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CSMSApp::CSMSApp()
{

}

CSMSApp::~CSMSApp()
{

}

void CSMSApp::SubmitSMSTest()
{
	//add account
	m_AccountManager.Test();

	CSMSItem sms;
	sms.m_SrcTerminalID = "8888";
	sms.m_DestTerminalID = "13312341234";	
	SubmitSMS(sms);
}

void CSMSApp::PeriodDispatch()
{
	m_Engine.Select();
	m_Dispatch.PeriodDispatch();
	m_AccountManager.PeriodDisptach();
	m_IFManager.PeriodDispatch();
}
